/* Plot histograms of each DGP's running variable.
*/

clear
set more off
set scheme  s1mono 

cap log close
log using "${logs}/dgp_histograms.log", replace	

* RDD
local count = 1
foreach dgp in "ADGP1" "BDGP2" "CDGP3" "DDGP4" "EDGP5" "FDGP6" "GDGP7" "HDGP8" "IDGP9" "JDGP10" "KDGP11" {
preserve
use "${dat}/DGP/`dgp'_ScaledRunningVariable.dta", clear
hist x, ytitle("") xtitle("") title("DGP `count'") xscale(range(-1 1)) ///
	name(graph`count', replace) 
local count = `count' + 1
restore
}
graph combine graph1 graph2 graph3 graph4 graph5 graph6 graph7 graph8 graph9 graph10 graph11
graph export "${output}/rdd_dgp_histograms.pdf", as(pdf) replace

graph close _all

log close
